package com.oreilly.hh.data;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;


/**
 * 			Represents track-related information in a album.
 * 		
 */

public class Album  implements java.io.Serializable {


    // Fields    

     private long id;
     private String title;
     private Date added;
     private Set artists = new HashSet(0);
     private List tracks = new ArrayList(0);


    // Constructors

    /** default constructor */
    public Album() {
    }

	/** minimal constructor */
    public Album(String title) {
        this.title = title;
    }
    
    /** full constructor */
    public Album(String title, Date added, Set artists, List tracks) {
        this.title = title;
        this.added = added;
        this.artists = artists;
        this.tracks = tracks;
    }

   
    // Property accessors

    public long getId() {
        return this.id;
    }
    
    private void setId(long id) {
        this.id = id;
    }

    public String getTitle() {
        return this.title;
    }
    
    public void setTitle(String title) {
        this.title = title;
    }

    public Date getAdded() {
        return this.added;
    }
    
    public void setAdded(Date added) {
        this.added = added;
    }

    public Set getArtists() {
        return this.artists;
    }
    
    public void setArtists(Set artists) {
        this.artists = artists;
    }

    public List getTracks() {
        return this.tracks;
    }
    
    public void setTracks(List tracks) {
        this.tracks = tracks;
    }
   

    /**
     * toString
     * @return String
     */
     public String toString() {
	  StringBuffer buffer = new StringBuffer();

      buffer.append(getClass().getName()).append("@").append(Integer.toHexString(hashCode())).append(" [");
      buffer.append("title").append("='").append(getTitle()).append("' ");			
      buffer.append("]");
      
      return buffer.toString();
     }







}